package org.example.Server.service;

import org.example.Server.mapper.CommenEnumMapper;
import org.example.Server.model.commen.Direction;
import org.example.Server.model.commen.Function;
import org.example.Server.utils.ResultAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommenEnumService {
    @Autowired
    CommenEnumMapper commenEnumMapper;

    /**
     * 获取话题考试方向
     *
     * @return
     */
    public ResultAPI getDirectionLsit() {
        List<Direction> directionList = commenEnumMapper.getDirectionLsit();
        return ResultAPI.success(directionList);
    }

    /**
     * 获取题库知识点
     *
     * @return
     */
    public ResultAPI getQspoint(Integer direction_id) {
        List<Direction> directionList = commenEnumMapper.getQspoint(direction_id);
        return ResultAPI.success(directionList);
    }

    public ResultAPI getFunction() {
        List<Function> functions = commenEnumMapper.getFunction();
        return ResultAPI.success(functions);
    }
}
